﻿<?php $this->load->view('layout/header'); ?>

<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['form1'];
if (!theForm) {
    theForm = document.form1;
}
function __doPostBack(eventTarget, eventArgument) {
    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        theForm.__EVENTTARGET.value = eventTarget;
        theForm.__EVENTARGUMENT.value = eventArgument;
        theForm.submit();
    }
}
//]]>
</script>
<script type="text/javascript">
//<![CDATA[
function WebForm_OnSubmit() {
if (typeof(ValidatorOnSubmit) == "function" && ValidatorOnSubmit() == false) return false;
return true;
}
//]]>
</script>
<form name="form1" method="post" action="/admin.php/config/admin_action/<?php echo $info['adminid']?>" onsubmit="javascript:return WebForm_OnSubmit();" id="form1">
<div>
</div>
    <div id="container">
        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table_form">
            <tr class="table_form_title">
                <td colspan="4">
                    <span id="lblTitle">添加</span>
                    管理员
                </td>
            </tr>
            <tr class="table_form_row">
                <td style="width: 15%" align="right">
                    <span class="star">*</span>管理员帐号：
                </td>
                <td>
                    <input name="adminname" type="text" value="<?php echo $info['adminname']?>" id="adminname" />
                    <span id="adminname_tips" style="color:Red;display:none;">不能为空</span>
                </td>
            </tr>
            <tr class="table_form_row">
                <td style="width: 15%" align="right">
                    <span class="star">*</span>管理员密码：
                </td>
                <td>
                    <input name="adminpass" type="password" id="adminpass" style="width:125px;" />
                    <span id="RequiredFieldValidator2" style="color:Red;">留空为不修改</span>
                </td>
            </tr>
            <tr class="table_form_row">
                <td style="width: 15%" align="right">
                    <span class="star">*</span>姓名：
                </td>
                <td>
                    <input name="realname" type="text" value="<?php echo $info['realname']?>" id="realname" />
                    <span id="realname_tips" style="color:Red;display:none;">不能为空</span>
                </td>
            </tr>
            <tr class="table_form_row">
                <td style="width: 15%" align="right">
                    <span class="star">*</span>E-mail：
                </td>
                <td>
                    <input name="email" email="true" type="text" value="<?php echo $info['email']?>" id="email" />
                    &nbsp;
                    <span id="email_tips" style="color:Red;display:none;">不能为空</span>
                    <span id="_email_tips" style="color:Red;display:none;">请输入正确的邮件地址</span>
                </td>
            </tr>
            <tr class="table_form_row">
                <td style="width: 15%" align="right">
                    <span class="star">*</span>部门：
                </td>
                <td>
                    <input name="department" type="text" value="<?php echo $info['department']?>" id="department" />
                    &nbsp;
                    <span id="department_tips" style="color:Red;display:none;">不能为空</span>
                </td>
            </tr>
            <tr class="table_form_row">
                <td style="width: 15%" align="right">
                    备注：
                </td>
                <td>
                    <textarea name="comment" rows="10" cols="40" id="comment"><?php echo $info['comment']?>
</textarea>
                    &nbsp;
                </td>
            </tr>
            <tr class="table_form_row">
                <td style="width: 15%" align="right">
                    是否关闭：
                </td>
                <td>
                    <span id="isclose"><input id="radIsClose_0" type="radio" name="isclose" value="1" /><label for="radIsClose_0">是</label><input id="radIsClose_1" type="radio" name="isclose" value="0" checked="checked" /><label for="radIsClose_1">否</label></span>
                </td>
            </tr>
            <tr class="table_form_btn">
                <td align="right">&nbsp;
                    
                </td>
                <td colspan="3">
                    <input type="submit" name="" value="保存" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;btnSave&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" id="btnSave" />
                    <input type="button" name="Submit" value="返回" onclick="javascript:history.go(-1);" />
                    <span id="errMsg" style="color:Red;"></span>
                </td>
            </tr>
        </table>
    </div>
</form>
<script type="text/javascript">
$('#form1').submit(function() {
	var is = true;
	if (!input_tips($('#department'))) {
	    is = false;
	}
	if (!input_tips($('#listid'))) {
	    is = false;
	}
	if (!input_tips($('#email'))) {
	    is = false;
	}
	if (!input_tips($('#adminname'))) {
	    is = false;
	}
	if (!input_tips($('#realname'))) {
	    is = false;
	}
	return is;
var val = $('#email').val();
var re = /^(\w-*\.*)+@(\w-?)+(\.\w{2,})+$/
if(re.test(val)){
	return true;
}else{
	$('#_email_tips').show();return false;
}
});
</script>
</body>
</html>

